load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "batcheval",
    srcs = [
        "cmd_add_sstable.go",
        "cmd_barrier.go",
        "cmd_clear_range.go",
        "cmd_compute_checksum.go",
        "cmd_conditional_put.go",
        "cmd_delete.go",
        "cmd_delete_range.go",
        "cmd_end_transaction.go",
        "cmd_export.go",
        "cmd_gc.go",
        "cmd_get.go",
        "cmd_heartbeat_txn.go",
        "cmd_increment.go",
        "cmd_init_put.go",
        "cmd_is_span_empty.go",
        "cmd_lease.go",
        "cmd_lease_info.go",
        "cmd_lease_request.go",
        "cmd_lease_transfer.go",
        "cmd_link_external_sstable.go",
        "cmd_merge.go",
        "cmd_migrate.go",
        "cmd_probe.go",
        "cmd_push_txn.go",
        "cmd_put.go",
        "cmd_query_intent.go",
        "cmd_query_locks.go",
        "cmd_query_resolved_timestamp.go",
        "cmd_query_txn.go",
        "cmd_range_stats.go",
        "cmd_recompute_stats.go",
        "cmd_recover_txn.go",
        "cmd_refresh.go",
        "cmd_refresh_range.go",
        "cmd_resolve_intent.go",
        "cmd_resolve_intent_range.go",
        "cmd_reverse_scan.go",
        "cmd_revert_range.go",
        "cmd_scan.go",
        "cmd_subsume.go",
        "cmd_truncate_log.go",
        "command.go",
        "declare.go",
        "eval_context.go",
        "lock.go",
        "ranges.go",
        "split_stats_helper.go",
        "stateloader.go",
        "transaction.go",
    ],
    importpath = "github.com/cockroachdb/cockroach/pkg/kv/kvserver/batcheval",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/build",
        "//pkg/keys",
        "//pkg/kv/kvpb",
        "//pkg/kv/kvserver/abortspan",
        "//pkg/kv/kvserver/batcheval/result",
        "//pkg/kv/kvserver/concurrency",
        "//pkg/kv/kvserver/concurrency/lock",
        "//pkg/kv/kvserver/gc",
        "//pkg/kv/kvserver/kvserverbase",
        "//pkg/kv/kvserver/kvserverpb",
        "//pkg/kv/kvserver/lockspanset",
        "//pkg/kv/kvserver/rditer",
        "//pkg/kv/kvserver/readsummary",
        "//pkg/kv/kvserver/readsummary/rspb",
        "//pkg/kv/kvserver/spanset",
        "//pkg/kv/kvserver/stateloader",
        "//pkg/kv/kvserver/txnwait",
        "//pkg/kv/kvserver/uncertainty",
        "//pkg/roachpb",
        "//pkg/settings",
        "//pkg/settings/cluster",
        "//pkg/storage",
        "//pkg/storage/enginepb",
        "//pkg/storage/fs",
        "//pkg/util",
        "//pkg/util/admission/admissionpb",
        "//pkg/util/hlc",
        "//pkg/util/iterutil",
        "//pkg/util/limit",
        "//pkg/util/log",
        "//pkg/util/metamorphic",
        "//pkg/util/mon",
        "//pkg/util/protoutil",
        "//pkg/util/tracing",
        "//pkg/util/uuid",
        "@com_github_cockroachdb_errors//:errors",
        "@com_github_cockroachdb_redact//:redact",
        "@com_github_gogo_protobuf//types",
        "@com_github_kr_pretty//:pretty",
        "@org_golang_x_time//rate",
    ],
)

go_test(
    name = "batcheval_test",
    size = "medium",
    srcs = [
        "cmd_add_sstable_test.go",
        "cmd_barrier_test.go",
        "cmd_clear_range_test.go",
        "cmd_delete_range_gchint_test.go",
        "cmd_delete_range_test.go",
        "cmd_end_transaction_test.go",
        "cmd_export_test.go",
        "cmd_get_test.go",
        "cmd_is_span_empty_test.go",
        "cmd_lease_test.go",
        "cmd_push_txn_test.go",
        "cmd_query_intent_test.go",
        "cmd_query_resolved_timestamp_test.go",
        "cmd_recover_txn_test.go",
        "cmd_refresh_range_bench_test.go",
        "cmd_refresh_range_test.go",
        "cmd_refresh_test.go",
        "cmd_resolve_intent_test.go",
        "cmd_revert_range_test.go",
        "cmd_scan_test.go",
        "cmd_truncate_log_test.go",
        "declare_test.go",
        "knobs_use_range_tombstones_test.go",
        "lock_test.go",
        "main_test.go",
        "ranges_test.go",
        "testutils_test.go",
        "transaction_test.go",
    ],
    embed = [":batcheval"],
    exec_properties = {"test.Pool": "large"},
    deps = [
        "//pkg/base",
        "//pkg/clusterversion",
        "//pkg/keys",
        "//pkg/kv",
        "//pkg/kv/kvpb",
        "//pkg/kv/kvserver",
        "//pkg/kv/kvserver/abortspan",
        "//pkg/kv/kvserver/batcheval/result",
        "//pkg/kv/kvserver/concurrency/isolation",
        "//pkg/kv/kvserver/concurrency/lock",
        "//pkg/kv/kvserver/gc",
        "//pkg/kv/kvserver/kvserverbase",
        "//pkg/kv/kvserver/kvserverpb",
        "//pkg/kv/kvserver/lockspanset",
        "//pkg/kv/kvserver/readsummary",
        "//pkg/kv/kvserver/readsummary/rspb",
        "//pkg/kv/kvserver/spanset",
        "//pkg/roachpb",
        "//pkg/security/securityassets",
        "//pkg/security/securitytest",
        "//pkg/server",
        "//pkg/settings/cluster",
        "//pkg/sql",
        "//pkg/sql/catalog",
        "//pkg/sql/catalog/bootstrap",
        "//pkg/sql/catalog/descpb",
        "//pkg/sql/catalog/desctestutils",
        "//pkg/sql/rowenc",
        "//pkg/sql/sem/tree",
        "//pkg/storage",
        "//pkg/storage/enginepb",
        "//pkg/storage/fs",
        "//pkg/testutils",
        "//pkg/testutils/serverutils",
        "//pkg/testutils/skip",
        "//pkg/testutils/sqlutils",
        "//pkg/testutils/storageutils",
        "//pkg/testutils/testcluster",
        "//pkg/testutils/testfixtures",
        "//pkg/util",
        "//pkg/util/admission",
        "//pkg/util/encoding",
        "//pkg/util/hlc",
        "//pkg/util/leaktest",
        "//pkg/util/log",
        "//pkg/util/protoutil",
        "//pkg/util/randutil",
        "//pkg/util/timeutil",
        "//pkg/util/tracing",
        "//pkg/util/uint128",
        "//pkg/util/uuid",
        "@com_github_cockroachdb_errors//:errors",
        "@com_github_cockroachdb_pebble//vfs",
        "@com_github_stretchr_testify//assert",
        "@com_github_stretchr_testify//require",
    ],
)
